home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / FADSSR / FADS.TXT < prev    next >
Encoding:
Text File  |  1995-03-28  |  10.9 KB  |  242 lines

  1. FADS 1.1
  2. ════════
  3. FADS: Find - Attributes - DateTime - Size
  4. ═════════════════════════════════════════
  5.  
  6. Warranty Disclaimer:
  7. ════════════════════
  8. The author disclaims all warranties as to this software, whether
  9. express or implied, including without limitation any implied
  10. warranties of merchantability or fitness for a particular purpose.
  11. In no event shall the author be liable for any loss of profit or
  12. any other commercial damage including, but not limited to special,
  13. incidental, consequential or other damages.
  14.  
  15. In other words, no lifeguard on duty - use at your own risk.
  16.  
  17. This is Freeware:
  18. ═════════════════
  19. This software may be freely copied, distributed, given away, and used
  20. as long as (a) no fee is charged for the software, excluding media, and
  21. (b) the complete set of original files is included in the distribution.
  22.  
  23. Files in this package:
  24. ══════════════════════
  25. FADS.EXE - The program
  26. FADS.TXT - This file (for those that didn't know).
  27.  
  28. Source Code:
  29. ════════════
  30. The complete source code to this program, FADS.PAS, is available on
  31. this download service in the file FADSSRC.ZIP.  The executable program,
  32. FADS.EXE, was compiled from FADS.PAS using Borland Pascal 7.0.
  33.  
  34. Comments to the author?:
  35. ════════════════════════
  36. If you have any comments, you can send them to me at:
  37.   CompuServe ID: 72674,1315
  38.  
  39.   Mailing address: Al
  40.                    P.O.Box 13266
  41.                    Burton, WA 98013
  42.  
  43. ═════════════════════════════════════════════════════════════════════════════
  44. Running this software:
  45. ══════════════════════
  46. This program is command-line driven.
  47. This program can act in 1 of 5 ways:
  48.   1. A "Touch" (file-date/timestamp modifier) program
  49.      if the filename is one of these:   FD,  FILEDATE,  TOUCH
  50.   2. A directory lister
  51.      if the filename is one of these:   LD,  LISTDIR
  52.   3. A file-finder (that totals file sizes)
  53.      if the filename is one of these:   FF,  FILEFIND,  FINDFILE
  54.   4. A file-attributer modifier
  55.      if the filename is one of these:   FA,  FILEATTR
  56.   5. A counter of lines in textfiles
  57.      if the filename is one of these:   LC,  COUNTLNS
  58.  
  59. Copy FADS.EXE to one of the above (e.g. TOUCH.EXE) to set its behavior.
  60.  
  61. Alternatively, set the environment variable FADS to one of the above
  62. names.  The environment variable overrides the filename.  That is, if
  63. you set FADS in the environment, it doesn't matter what the executable
  64. is named.
  65.  
  66. Enter FADS /? (or whatever the name of the executable) to display
  67. the syntax of usage.
  68. ═════════════════════════════════════════════════════════════════════════════
  69.  
  70. TOUCH syntax:
  71. ═════════════
  72. TOUCH will modify the timestamp (date & time) of a file.
  73.  
  74. Syntax: TOUCH pathname [/D[date]] [/T[time]] [/S] [/Y] [/1]
  75.  
  76.     /D[mm-dd-yy]  Set the file date to [mm-dd-yy]
  77.     /T[hh:mm:ss]  Set the file time to [hour:minute:second]
  78.     /S            Include Subdirectories.
  79.     /Y            Automatically answer Yes to confirmation prompt.
  80.     /1            Force confirmation prompt even if only one file.
  81.  
  82. NOTES: 1. If more than one file's timestamp would be modified,
  83.           you are prompted to confirm, unless /Y is included.
  84.        2. Files flagged ReadOnly, Hidden or System are not touched.
  85.        3. If you do not include /D or /T, TOUCH will set the file's timestamp
  86.           to that of the current date & time.
  87.        4. Hour:minute:second can be from 00:00:00 to 23:59:59.
  88.        5. Including both /Y and /1 is dumb, and skips the confirmation prompt.
  89.  
  90. ═════════════════════════════════════════════════════════════════════════════
  91. LISTDIR syntax:
  92. ═══════════════
  93. LISTDIR lists directories starting at the specified directory.
  94.  
  95. Syntax: LD [starting directory] [/W:file] [/W[1][2][3][4]] [/WO] [/Y]
  96.  
  97.     /W:file       Write output to file as well as to screen.  Assumes /Y.
  98.     /W[1][2][3][4]  Write to output file (default all) e.g./W23
  99.        1 - echo command line
  100.        2 - Starting directory & # of directories found
  101.        3 - Directories (without number)
  102.        4 - Directories with leading number and period (overrides 3)
  103.     /WO           Overwrite output file (if it exists) without prompting.
  104.     /Y            Don't pause after each screenful.
  105. NOTES: 1. The default starting directory is the CURRENT directory.
  106.  
  107. ═════════════════════════════════════════════════════════════════════════════
  108. FILEFIND syntax:
  109. ════════════════
  110. FILEFIND finds files matching the pathname and specified attributes (if any).
  111. Syntax: FILEFIND [pathname] [/A[+/-]] [/R[+/-]] [/H[+/-]] [/SYS[+/-]] [/S-]
  112.                             [/Z] [/E:var] [/L] [/FIT:drive] [/C]
  113.                             [/W:file] [/W[1][2][3][4][5][6][7]] [/WO] [/Y]
  114.     /A or /A+     Find files with Archive attribute set
  115.     /A-           Find files without Archive attribute set
  116.     /R or /R+     Find files with ReadOnly attribute set
  117.     /R-           Find files without ReadOnly attribute set
  118.     /H or /H+     Find files with Hidden attribute set
  119.     /H-           Find files without Hidden attribute set
  120.     /SYS or /SYS+ Find files with System attribute set
  121.     /SYS-         Find files without System attribute set
  122.     /S-           Exclude Subdirectories.  (default : search subdirectories)
  123.     /Z            Scan through .ZIP files (sensitive to attrib) for filespec
  124.     /E:var        Search the only directories listed in environment variable
  125.                   named after E:.  (e.g. /E:PATH)
  126.     /L            Count lines in files ( NOTE: Textfiles are assumed! ).
  127.     /FIT:drive    Determine space required to copy found files to drive.
  128.     /C            Cluster size scenarios.
  129.     /W:file       Write output to file as well as to screen.  Assumes /Y.
  130.     /W[1][2][3][4][5][6][7]  Write to output file (default all) e.g./W1246
  131.        1 - echo command line
  132.        2 - Starting directory & # of directories found
  133.        3 - Directories (without number)
  134.        4 - Directories with leading number and period (overrides 3)
  135.        5 - File information
  136.        6 - # of file found
  137.        7 - bytes summary information
  138.     /WO           Overwrite output file (if it exists) without prompting.
  139.     /Y            Don't pause after each screenful.
  140. NOTES: 1. Default starting search directory is the CURRENT directory.
  141.        2. Default filespec is *.*.  Additional filespecs may be added.
  142.        3. Files found in ZIPs have compressed size listed under "Space Used".
  143.  
  144.   About Cluster Size scenarios (/C):
  145.   ──────────────────────────────────
  146.   This option will calculate how much space files will use up on your hard
  147.   disk based on the cluster size.
  148.   A client had just bought a new 486-66 with a 540 MB HD (partitioned as only
  149.   a single C: drive.).  They had an existing 486-66 with a 440 MB HD (also
  150.   as a single C:), with only 37 MB free.  I was asked to transfer the files
  151.   from the existing to the new machine to provide the user with additional
  152.   free space.  After copying the files from the 440 MB HD to the 540 MB HD,
  153.   there were only 32 MB free on the 540 MB HD.  No gain in free space, but
  154.   a LOSS!  Needless to say, I now keep my partitions under 512 MB.
  155.  
  156.   Using FILEFIND to search multiple drives:
  157.   ─────────────────────────────────────────
  158.   Please create a batchfile called FFF.BAT (or whatever) with the following
  159.   lines:
  160.      @echo off
  161.      if [%1]==[] goto info
  162.      FOR %%d IN (%2 %3 %4 %5 %6 %7 %8 %9) DO FF %%d\%1
  163.      goto endbat
  164.      :info
  165.      echo Enter %0 filespec drive1 [drive2] [drive3]..[drive9]
  166.      echo e.g. %0 *.EXE C: D: E:
  167.      :endbat
  168.  
  169.   In order to make this program available, I decided not to spend time
  170.   modifying the code to perform search on multiple drives.  With the
  171.   source code (available on CompuServe) and the Borland Pascal compiler,
  172.   you could incorporate this feature if you wish.
  173.  
  174. ═════════════════════════════════════════════════════════════════════════════
  175. FILEATTR syntax:
  176. ════════════════
  177. FILEATTR will modify the attributes of a file.
  178.  
  179. Syntax: FILEATTR pathname [/A+|/A-] [/R+|/R-] [/H+|/H-] [/SYS+|/SYS-]
  180.                           [/S] [/Y] [/1]
  181.  
  182.     /A+           Sets Archive attribute
  183.     /A-           Removes Archive attribute
  184.     /R+           Sets ReadOnly attribute
  185.     /R-           Removes ReadOnly attribute
  186.     /H+           Sets Hidden attribute
  187.     /H-           Removes Hidden attribute
  188.     /SYS+         Sets System attribute
  189.     /SYS-         Removes System attribute
  190.     /S            Include Subdirectories.
  191.     /Y            Automatically answer Yes to confirmation prompt.
  192.     /1            Force confirmation prompt even if only one file.
  193.  
  194. NOTES: 1. If more than one file's attributes would be modified,
  195.           you are prompted to confirm, unless /Y is included.
  196.        2. Including both /Y and /1 is dumb, and skips the confirmation prompt.
  197.  
  198. ═════════════════════════════════════════════════════════════════════════════
  199. COUNTLNS syntax:
  200. ════════════════
  201. COUNTLNS finds files matching the pathname and specified attributes (if any)
  202.          and counts the number of lines found in each.
  203. Syntax: COUNTLNS [pathname] [/A[+/-]] [/R[+/-]] [/H[+/-]] [/SYS[+/-]]
  204.                             [/E:var] [/S]
  205.                             [/W:file] [/W[1][2][3][4][5][6][7]] [/WO] [/Y]
  206.     /A or /A+     Find files with Archive attribute set
  207.     /A-           Find files without Archive attribute set
  208.     /R or /R+     Find files with ReadOnly attribute set
  209.     /R-           Find files without ReadOnly attribute set
  210.     /H or /H+     Find files with Hidden attribute set
  211.     /H-           Find files without Hidden attribute set
  212.     /SYS or /SYS+ Find files with System attribute set
  213.     /SYS-         Find files without System attribute set
  214.     /E:var        Search the only directories listed in environment variable
  215.                   named after E:.  (e.g. /E:PATH)
  216.     /S            Include Subdirectories.
  217.     /W:file       Write output to file as well as to screen.  Assumes /Y.
  218.     /W[1][2][3][4][5][6][7]  Write to output file (default all) e.g./W1246
  219.        1 - echo command line
  220.        2 - Starting directory & # of directories found
  221.        3 - Directories (without number)
  222.        4 - Directories with leading number and period (overrides 3)
  223.        5 - File information
  224.        6 - # of file found
  225.        7 - bytes summary information
  226.     /WO           Overwrite output file (if it exists) without prompting.
  227.     /Y            Don't pause after each screenful.
  228. NOTES: 1. Default starting search directory is the CURRENT directory.
  229.        2. Default filespec is *.*.  Additional filespecs may be added.
  230.        3. Files found in ZIPs have compressed size listed under "Space Used".
  231.  
  232.  
  233.   About CountLns:
  234.   ───────────────
  235.   CountLns is essentially the same as FILEFIND above, except that the
  236.   /L (count lines) and /S- (don't search subdirectories) switches do
  237.   not need to be specified.
  238.  
  239. ═════════════════════════════════════════════════════════════════════════════
  240.   eof: FADS.TXT
  241. ═════════════════════════════════════════════════════════════════════════════
  242.